 package tools.packet;

 import client.MapleCharacter;
 import client.MapleForce;
 import client.MapleForceType;
 import constants.ServerConstants;
 import handling.opcode.SendPacketOpcode;
 import java.awt.Point;
 import java.awt.Rectangle;
 import java.util.Iterator;
 import java.util.List;
 import org.apache.logging.log4j.LogManager;
 import org.apache.logging.log4j.Logger;
 import server.life.MapleMonster;
 import tools.DateUtil;
 import tools.MaplePacketCreator;
 import tools.Randomizer;
 import tools.data.output.MaplePacketLittleEndianWriter;

 public class ForcePacket
 {
/*   22 */   private static final Logger log = LogManager.getLogger(MaplePacketCreator.class);

   public static byte[] showForce(MapleForce force) {
/*   25 */     return showForce(force, (Point)null, 0, (Rectangle)null);
   }

   public static byte[] showForce(MapleForce force, Point point) {
/*   29 */     return showForce(force, point, 0, (Rectangle)null);
   }

   public static byte[] showForce(MapleForce force, Point point, int cosumeItemID, Rectangle rectangle) {
/*   33 */     if (ServerConstants.isShowPacket()) {
/*   34 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*   36 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*   37 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());

/*   39 */     mplew.writeBool((force.getFromMobOID() > 0));
/*   40 */     mplew.writeInt(force.getOwnerID());
/*   41 */     if (force.getFromMobOID() > 0) {
/*   42 */       mplew.writeInt(force.getFromMobOID());
     }
/*   44 */     mplew.writeInt(force.getType().ordinal());
/*   45 */     if (force.getType() != MapleForceType.恶魔精气) {
/*   46 */       mplew.write(force.getSubType());

/*   48 */       if (force.getType() != MapleForceType.黑杰克) {
/*   49 */         if (force.getType().isMultiMob()) {
/*   50 */           mplew.writeInt(force.getToMobOID().size());
         }

/*   53 */         for (Integer mobid : force.getToMobOID()) {
/*   54 */           mplew.writeInt(mobid.intValue());
         }
       } else {
/*   57 */         mplew.writeInt(0);
       }
/*   59 */       mplew.writeInt(force.getSkillID());
     }


/*   63 */     for (int i = 0; i < force.getBulletCount(); i++) {
/*   64 */       mplew.write(1);

/*   66 */       mplew.writeInt(i + 1);


/*   69 */       mplew.writeInt((force.getSkillID() == 31221014) ? 3 : ((force.getSkillID() == 400041038) ? 2 : 1));
/*   70 */       switch (force.getType()) {
         case 恶魔精气:
/*   72 */           mplew.writeInt(Randomizer.rand(35, 49));
/*   73 */           mplew.writeInt(Randomizer.rand(5, 6));
/*   74 */           mplew.writeInt(Randomizer.rand(30, 68));
/*   75 */           mplew.writeInt(0);
           break;
         case 幻影卡牌:
/*   78 */           mplew.writeInt(Randomizer.rand(15, 32));
/*   79 */           mplew.writeInt(Randomizer.rand(7, 10));
/*   80 */           mplew.writeInt(Randomizer.rand(9, 25));
/*   81 */           mplew.writeInt(0);
           break;
         case 追击盾_审判之焰:
/*   84 */           mplew.writeInt(Randomizer.rand(16, 18));
/*   85 */           mplew.writeInt(Randomizer.rand(20, 28));
/*   86 */           mplew.writeInt(Randomizer.rand(34, 66));
/*   87 */           mplew.writeInt(60);
           break;
         case 精准火箭:
/*   90 */           mplew.writeInt(Randomizer.rand(15, 20));
/*   91 */           mplew.writeInt(Randomizer.rand(20, 30));
/*   92 */           mplew.writeInt(Randomizer.rand(120, 150));
/*   93 */           mplew.writeInt(Randomizer.rand(300, 900));
           break;
         case 宙斯盾系统:
/*   96 */           mplew.writeInt(35);
/*   97 */           mplew.writeInt(5);
/*   98 */           mplew.writeInt(Randomizer.rand(80, 90));
/*   99 */           mplew.writeInt(Randomizer.rand(100, 500));
           break;
         case 三彩箭矢:
/*  102 */           mplew.writeInt(Randomizer.rand(10, 14));
/*  103 */           mplew.writeInt(Randomizer.rand(8, 9));
/*  104 */           mplew.writeInt(Randomizer.rand(211, 314));
/*  105 */           mplew.writeInt(Randomizer.rand(30, 59));
           break;
         case 狂风肆虐:
/*  108 */           mplew.writeInt(Randomizer.rand(40, 50));
/*  109 */           mplew.writeInt(Randomizer.rand(5, 9));
/*  110 */           mplew.writeInt(Randomizer.rand(150, 180));
/*  111 */           mplew.writeInt(Randomizer.rand(30, 40));
           break;
         case 灵狐:
/*  114 */           mplew.writeInt(Randomizer.rand(16, 18));
/*  115 */           mplew.writeInt(21);
/*  116 */           mplew.writeInt(46);
/*  117 */           mplew.writeInt(630);
           break;
         case 辅助导弹:
/*  120 */           mplew.writeInt(50);
/*  121 */           mplew.writeInt(Randomizer.rand(11, 13));
/*  122 */           mplew.writeInt(Randomizer.rand(26, 39));
/*  123 */           mplew.writeInt(500);
/*  124 */           mplew.writeInt(0);
/*  125 */           mplew.writeInt(0);
           break;
         case 制裁火球:
/*  128 */           mplew.writeInt(Randomizer.rand(35, 50));
/*  129 */           mplew.writeInt(Randomizer.rand(5, 7));
/*  130 */           mplew.writeInt(Randomizer.rand(30, 60));
/*  131 */           mplew.writeInt(Randomizer.rand(400, 500));
           break;
         case 向导之箭:
/*  134 */           mplew.writeInt(43);
/*  135 */           mplew.writeInt(3);
/*  136 */           mplew.writeInt(90);
/*  137 */           mplew.writeInt(840);
           break;
         case 爱星能量:
/*  140 */           mplew.writeInt(Randomizer.rand(36, 39));
/*  141 */           mplew.writeInt(Randomizer.rand(5, 6));
/*  142 */           mplew.writeInt(Randomizer.rand(33, 64));
/*  143 */           mplew.writeInt(Randomizer.rand(512, 544));
           break;
         case 火焰释放:
/*  146 */           mplew.writeInt(Randomizer.rand(16, 18));
/*  147 */           mplew.writeInt(Randomizer.rand(20, 28));
/*  148 */           mplew.writeInt(Randomizer.rand(34, 66));
/*  149 */           mplew.writeInt(60);
           break;
         case 残影之矢:
/*  152 */           mplew.writeInt(Randomizer.rand(16, 21));
/*  153 */           mplew.writeInt(Randomizer.rand(5, 6));
/*  154 */           mplew.writeInt(Randomizer.rand(34, 66));
/*  155 */           mplew.writeInt(Randomizer.rand(34, 66));
           break;
         case 达克鲁秘卷:
/*  158 */           mplew.writeInt(Randomizer.rand(32, 37));
/*  159 */           mplew.writeInt(Randomizer.rand(3, 5));
/*  160 */           mplew.writeInt(Randomizer.rand(32, 48));
/*  161 */           mplew.writeInt(528);
           break;
         case 黑杰克:
/*  164 */           mplew.writeInt(Randomizer.rand(50, 85));
/*  165 */           mplew.writeInt(Randomizer.rand(4, 20));
/*  166 */           mplew.writeInt(Randomizer.rand(48, 59));
/*  167 */           mplew.writeInt(760);
           break;
         case 懒虫:
/*  170 */           mplew.writeInt(Randomizer.rand(30, 48));
/*  171 */           mplew.writeInt(Randomizer.rand(3, 4));
/*  172 */           mplew.writeInt(Randomizer.rand(16, 32));
/*  173 */           mplew.writeInt(528);
           break;
         case 剑刃之壁:
/*  176 */           mplew.writeInt(Randomizer.rand(10, 12));
/*  177 */           mplew.writeInt(Randomizer.rand(3, 5));
/*  178 */           mplew.writeInt(Randomizer.rand(260, 280));
/*  179 */           mplew.writeInt(16);
           break;
         case 微型导弹箱:
/*  182 */           mplew.writeInt(Randomizer.rand(42, 47));
/*  183 */           mplew.writeInt(Randomizer.rand(4, 6));
/*  184 */           mplew.writeInt(Randomizer.rand(23, 35));
/*  185 */           mplew.writeInt(1440);
/*  186 */           mplew.writeInt(0);
/*  187 */           mplew.writeInt(0);
           break;
         default:
/*  190 */           mplew.writeZeroBytes(16);
           break;
       }
/*  193 */       if (point != null) {
/*  194 */         mplew.writeInt(Randomizer.rand(-600 + point.x, 600 + point.x));
/*  195 */         mplew.writeInt(Randomizer.rand(-300 + point.y, 50 + point.y));
       } else {
/*  197 */         mplew.writeInt(0);
/*  198 */         switch (force.getType()) {
           case 幻影卡牌:
/*  200 */             mplew.writeInt(Randomizer.rand(0, 10));
             break;
           default:
/*  203 */             mplew.writeInt(0);
             break;
         }
       }
/*  207 */       mplew.writeInt(DateUtil.getSpecialNowiTime());
/*  208 */       mplew.writeInt(0);
/*  209 */       mplew.writeInt(0);
/*  210 */       switch (force.getType()) {
         case 幻影卡牌:
/*  212 */           mplew.writeInt(Randomizer.rand(0, 10));
           break;
         default:
/*  215 */           mplew.writeInt(0);
           break;
       }

     }
/*  220 */     mplew.write(0);

/*  222 */     switch (force.getType()) {

       case 制裁火球:
/*  225 */         if (point != null) {







/*  233 */           if (force.getSkillID() == 400021001) {
/*  234 */             mplew.writeInt(-600 + point.x);
/*  235 */             mplew.writeInt(-300 + point.y);
/*  236 */             mplew.writeInt(600 + point.x);
/*  237 */             mplew.writeInt(50 + point.y);
/*  238 */             mplew.writeInt(0);
           }
/*  240 */           if (force.getSkillID() == 400031000) {
/*  241 */             mplew.writeInt(-500);
/*  242 */             mplew.writeInt(-300);
/*  243 */             mplew.writeInt(500);
/*  244 */             mplew.writeInt(350);
/*  245 */             mplew.writeInt(0);
           }  break;
         }
/*  248 */         mplew.writeZeroBytes(20);
         break;


       case 爱星能量:
/*  253 */         mplew.writeInt(0);
/*  254 */         mplew.writeInt(0);
/*  255 */         mplew.writeInt(0);
/*  256 */         mplew.writeInt(0);
/*  257 */         mplew.writeInt(0);
/*  258 */         mplew.writeInt(0);
         break;
       case 火焰释放:
/*  261 */         mplew.writeInt(-2612);
/*  262 */         mplew.writeInt(136);
         break;
       case 达克鲁秘卷:
/*  265 */         mplew.writeInt(cosumeItemID);
/*  266 */         mplew.writeInt(force.getSummonOId());




/*  271 */         mplew.writeRect(rectangle);
         break;
       case 黑杰克:
/*  274 */         mplew.writeInt(point.x);
/*  275 */         mplew.writeInt(point.y);
         break;
       case 懒虫:
/*  278 */         mplew.writeInt(0);
/*  279 */         mplew.writeInt(0);
/*  280 */         mplew.writeInt(0);
/*  281 */         mplew.writeInt(0);
/*  282 */         mplew.writeInt(0);
         break;
     }

/*  286 */     return mplew.getPacket();
   }

   public static byte[] UserExplosionAttack(MapleMonster monster) {
/*  290 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  292 */     mplew.writeShort(SendPacketOpcode.USER_EXPLOSION_ATTACK.getValue());
/*  293 */     mplew.writeInt(36110005);
/*  294 */     mplew.writePos(monster.getTruePosition());
/*  295 */     mplew.writeInt(2);
/*  296 */     mplew.writeInt(monster.getObjectId());
/*  297 */     mplew.writeInt(0);

/*  299 */     return mplew.getPacket();
   }


   public static byte[] 黑杰克反射(int chrId, int skillId, int forceCount, int moboid, MapleMonster monster) {
/*  304 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  306 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  307 */     mplew.write(1);
/*  308 */     mplew.writeInt(chrId);
/*  309 */     mplew.writeInt(moboid);
/*  310 */     mplew.writeInt(33);
/*  311 */     mplew.write(1);
/*  312 */     mplew.writeInt(0);
/*  313 */     mplew.writeInt(skillId);

/*  315 */     mplew.write(1);
/*  316 */     mplew.writeInt(forceCount);
/*  317 */     mplew.writeInt(32);

/*  319 */     mplew.writeInt(Randomizer.rand(64, 69));
/*  320 */     mplew.writeInt(Randomizer.rand(3, 5));
/*  321 */     mplew.writeInt(Randomizer.rand(52, 62));
/*  322 */     mplew.writeInt(0);

/*  324 */     mplew.writeInt(0);
/*  325 */     mplew.writeInt(0);

/*  327 */     mplew.writeInt(DateUtil.getSpecialNowiTime());
/*  328 */     mplew.writeInt(1);

/*  330 */     mplew.writeInt(0);
/*  331 */     mplew.writeInt(0);
/*  332 */     mplew.write(0);

/*  334 */     mplew.writeInt((monster.getTruePosition()).x);
/*  335 */     mplew.writeInt((monster.getTruePosition()).y);

/*  337 */     return mplew.getPacket();
   }




   public static byte[] 金钱炸弹效果(int chrId, int skillId, int forceCount, List<Integer> moboids, List<Point> posFroms) {
/*  344 */     if (ServerConstants.isShowPacket()) {
/*  345 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  347 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  349 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  350 */     mplew.write(0);
/*  351 */     mplew.writeInt(chrId);
/*  352 */     mplew.writeInt(12);
/*  353 */     mplew.write(1);
/*  354 */     mplew.writeInt(moboids.size());
/*  355 */     for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) { int moboid = ((Integer)iterator.next()).intValue();
/*  356 */       mplew.writeInt(moboid); }

/*  358 */     mplew.writeInt(skillId);

/*  360 */     for (int i = 0; i < posFroms.size(); i++) {
/*  361 */       mplew.write(1);
/*  362 */       mplew.writeInt(forceCount + i);
/*  363 */       mplew.writeInt(1);
/*  364 */       mplew.writeInt(Randomizer.rand(40, 44));
/*  365 */       mplew.writeInt(Randomizer.rand(3, 4));
/*  366 */       mplew.writeInt(Randomizer.rand(50 + i * 10, 100 + i * 10));
/*  367 */       mplew.writeInt(700);
/*  368 */       Point posFrom = posFroms.get(i);
/*  369 */       mplew.writeInt((posFrom != null) ? posFrom.x : 0);
/*  370 */       mplew.writeInt((posFrom != null) ? posFrom.y : 0);
/*  371 */       mplew.writeZeroBytes(8);
/*  372 */       mplew.writeInt(0);
/*  373 */       mplew.writeInt(0);
/*  374 */       mplew.writeInt(0);
/*  375 */       mplew.writeInt(0);
     }
/*  377 */     mplew.write(0);

/*  379 */     return mplew.getPacket();
   }

   public static byte[] 暴风灭世效果(int chrId, int oid, int skillId, int forceCount) {
/*  383 */     if (ServerConstants.isShowPacket()) {
/*  384 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  386 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  388 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  389 */     mplew.write(0);
/*  390 */     mplew.writeInt(chrId);
/*  391 */     mplew.writeInt(8);
/*  392 */     mplew.write(1);
/*  393 */     mplew.writeInt(oid);
/*  394 */     mplew.writeInt(skillId);

/*  396 */     mplew.write(1);
/*  397 */     mplew.writeInt(forceCount);
/*  398 */     mplew.writeInt(1);
/*  399 */     mplew.writeInt(1);
/*  400 */     mplew.writeInt(6);
/*  401 */     mplew.writeInt(270);
/*  402 */     mplew.writeInt(75);
/*  403 */     mplew.writeInt(35);
/*  404 */     mplew.writeInt(42);
/*  405 */     mplew.writeZeroBytes(8);
/*  406 */     mplew.writeInt(0);
/*  407 */     mplew.writeInt(0);
/*  408 */     mplew.writeInt(0);
/*  409 */     mplew.writeInt(0);

/*  411 */     mplew.write(0);

/*  413 */     return mplew.getPacket();
   }

   public static byte[] 灵魂吸取攻击(int chrId, int skillId, int forceCount, int moboid) {
/*  417 */     if (ServerConstants.isShowPacket()) {
/*  418 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  420 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  422 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  423 */     mplew.write(1);
/*  424 */     mplew.writeInt(chrId);
/*  425 */     mplew.writeInt(moboid);
/*  426 */     mplew.writeInt(4);
/*  427 */     mplew.write(1);
/*  428 */     mplew.writeInt(moboid);
/*  429 */     mplew.writeInt(skillId);

/*  431 */     mplew.write(1);
/*  432 */     mplew.writeInt(forceCount);
/*  433 */     mplew.writeInt(1);
/*  434 */     mplew.writeInt(42);
/*  435 */     mplew.writeInt(4);
/*  436 */     mplew.writeInt(42);
/*  437 */     mplew.writeInt(0);
/*  438 */     mplew.writeZeroBytes(8);
/*  439 */     mplew.writeZeroBytes(8);
/*  440 */     mplew.writeInt(0);
/*  441 */     mplew.writeInt(0);
/*  442 */     mplew.writeInt(0);
/*  443 */     mplew.writeInt(0);


/*  446 */     mplew.write(0);

/*  448 */     return mplew.getPacket();
   }

   public static byte[] 三彩箭矢效果(int chrId, int oid, int skillId, int forceCount) {
/*  452 */     if (ServerConstants.isShowPacket()) {
/*  453 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  455 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  457 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  458 */     mplew.write(0);
/*  459 */     mplew.writeInt(chrId);
/*  460 */     mplew.writeInt(10);
/*  461 */     mplew.write(1);
/*  462 */     mplew.writeInt(oid);
/*  463 */     mplew.writeInt(skillId);

/*  465 */     mplew.write(1);
/*  466 */     mplew.writeInt(forceCount);
/*  467 */     mplew.writeInt(0);
/*  468 */     mplew.writeInt(13);
/*  469 */     mplew.writeInt(9);
/*  470 */     mplew.writeInt(211);
/*  471 */     mplew.writeInt(35);
/*  472 */     mplew.writeZeroBytes(8);
/*  473 */     mplew.writeZeroBytes(8);
/*  474 */     mplew.writeInt(0);
/*  475 */     mplew.writeInt(0);
/*  476 */     mplew.writeInt(0);
/*  477 */     mplew.writeInt(0);

/*  479 */     mplew.write(0);

/*  481 */     return mplew.getPacket();
   }




   public static byte[] showTrackFlames(int chrid, int skillid, byte skilllevel, int forceCount, int mobid, short direction) {
/*  488 */     if (ServerConstants.isShowPacket()) {
/*  489 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  491 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();
/*  492 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  493 */     mplew.write(0);
/*  494 */     mplew.writeInt(chrid);
/*  495 */     mplew.writeInt(17);
/*  496 */     mplew.write(1);
/*  497 */     mplew.writeInt(mobid);
/*  498 */     mplew.writeInt(skillid);

/*  500 */     mplew.write(1);
/*  501 */     mplew.writeInt(forceCount);
/*  502 */     mplew.writeInt(4);
/*  503 */     mplew.writeInt(skilllevel);
/*  504 */     mplew.writeInt(skilllevel);
/*  505 */     mplew.writeInt(90);
/*  506 */     mplew.writeZeroBytes(12);
/*  507 */     mplew.writeHexString("D0 B3 68 D7");
/*  508 */     mplew.writeInt(4);
/*  509 */     mplew.writeInt(0);
/*  510 */     mplew.writeInt(0);
/*  511 */     mplew.write(0);
/*  512 */     mplew.writeInt(direction);
/*  513 */     mplew.writeInt(500);

/*  515 */     return mplew.getPacket();
   }

   public static byte[] ShieldChacing(int cid, List<Integer> moblist, int skillid, int bulletCount, int delay) {
/*  519 */     if (ServerConstants.isShowPacket()) {
/*  520 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  522 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  524 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  525 */     mplew.write(0);
/*  526 */     mplew.writeInt(cid);
/*  527 */     mplew.writeInt(3);
/*  528 */     mplew.write(1);
/*  529 */     mplew.writeInt(moblist.size());
/*  530 */     for (Integer aMoblist : moblist) {
/*  531 */       mplew.writeInt(aMoblist.intValue());
     }
/*  533 */     mplew.writeInt(skillid);
/*  534 */     for (int i = 1; i <= bulletCount; i++) {
/*  535 */       mplew.write(1);
/*  536 */       mplew.writeInt(1 + i);
/*  537 */       mplew.writeInt(3);
/*  538 */       mplew.writeInt(Randomizer.rand(1, 20));
/*  539 */       mplew.writeInt(Randomizer.rand(20, 50));
/*  540 */       mplew.writeInt(Randomizer.rand(50, 200));
/*  541 */       mplew.writeInt(delay);
/*  542 */       mplew.writeLong(0L);
/*  543 */       mplew.writeInt(Randomizer.nextInt());
/*  544 */       mplew.writeInt(0);
/*  545 */       mplew.writeInt(0);
/*  546 */       mplew.writeInt(0);
     }
/*  548 */     mplew.write(0);
/*  549 */     return mplew.getPacket();
   }

   public static byte[] 向导之箭(int chrId, int skillId) {
/*  553 */     if (ServerConstants.isShowPacket()) {
/*  554 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }

/*  557 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  559 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  560 */     mplew.write(0);
/*  561 */     mplew.writeInt(chrId);
/*  562 */     mplew.writeInt(27);
/*  563 */     mplew.write(1);

/*  565 */     mplew.writeInt(0);
/*  566 */     mplew.writeInt(skillId);

/*  568 */     mplew.write(1);
/*  569 */     mplew.writeInt(Randomizer.rand(100, 650));
/*  570 */     mplew.writeInt(1);
/*  571 */     mplew.writeInt(43);
/*  572 */     mplew.writeInt(3);
/*  573 */     mplew.writeInt(90);
/*  574 */     mplew.writeInt(840);

/*  576 */     mplew.writeInt(0);
/*  577 */     mplew.writeInt(0);

/*  579 */     mplew.writeInt(DateUtil.getSpecialNowiTime());
/*  580 */     mplew.writeInt(0);
/*  581 */     mplew.writeInt(0);
/*  582 */     mplew.writeInt(0);

/*  584 */     mplew.write(0);

/*  586 */     mplew.writeInt(-500);
/*  587 */     mplew.writeInt(-350);
/*  588 */     mplew.writeInt(500);
/*  589 */     mplew.writeInt(350);

/*  591 */     mplew.writeInt(0);
/*  592 */     mplew.writeInt(0);
/*  593 */     mplew.writeInt(0);

/*  595 */     return mplew.getPacket();
   }


   public static byte[] ShieldChacingRe(int cid, int unkwoun, int oid, int cn) {
/*  600 */     if (ServerConstants.isShowPacket()) {
/*  601 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  603 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  605 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  606 */     mplew.write(1);
/*  607 */     mplew.writeInt(cid);
/*  608 */     mplew.writeInt(unkwoun);
/*  609 */     mplew.writeInt(4);
/*  610 */     mplew.write(1);
/*  611 */     mplew.writeInt(oid);
/*  612 */     mplew.writeInt(31221014);

/*  614 */     mplew.write(1);
/*  615 */     mplew.writeInt(cn + 1);
/*  616 */     mplew.writeInt(3);
/*  617 */     mplew.writeInt(Randomizer.rand(40, 44));
/*  618 */     mplew.writeInt(3);
/*  619 */     mplew.writeInt(Randomizer.rand(36, 205));
/*  620 */     mplew.writeInt(0);
/*  621 */     mplew.writeLong(0L);
/*  622 */     mplew.writeInt(Randomizer.nextInt());
/*  623 */     mplew.writeInt(0);
/*  624 */     mplew.writeInt(0);
/*  625 */     mplew.writeInt(0);
/*  626 */     mplew.writeInt(0);
/*  627 */     mplew.writeInt(0);
/*  628 */     mplew.write(0);

/*  630 */     return mplew.getPacket();
   }

   public static byte[] 心灵传动攻击效果(int chrId, int oid, int skillId, int forceCount) {
/*  634 */     if (ServerConstants.isShowPacket()) {
/*  635 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  637 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  639 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  640 */     mplew.write(0);
/*  641 */     mplew.writeInt(chrId);
/*  642 */     mplew.writeInt(22);
/*  643 */     mplew.write(1);
/*  644 */     mplew.writeInt(oid);
/*  645 */     mplew.writeInt(skillId);

/*  647 */     mplew.write(1);
/*  648 */     mplew.writeInt(forceCount);
/*  649 */     mplew.writeInt(0);
/*  650 */     mplew.writeInt(24);
/*  651 */     mplew.writeInt(9);
/*  652 */     mplew.writeInt(116);
/*  653 */     mplew.writeInt(960);
/*  654 */     mplew.writeZeroBytes(8);
/*  655 */     mplew.writeZeroBytes(8);
/*  656 */     mplew.writeInt(0);
/*  657 */     mplew.writeInt(0);
/*  658 */     mplew.writeInt(0);
/*  659 */     mplew.writeInt(0);

/*  661 */     mplew.write(0);

/*  663 */     return mplew.getPacket();
   }












   public static byte[] Show影子蝙蝠锁定(int chrId, int skillId, int mobids, int szieLevel, Point posFrom, int forceCount) {
/*  678 */     if (ServerConstants.isShowPacket()) {
/*  679 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  681 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  683 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  684 */     mplew.write(0);
/*  685 */     mplew.writeInt(chrId);
/*  686 */     mplew.writeInt(15);
/*  687 */     mplew.write(1);
/*  688 */     mplew.writeInt(mobids);
/*  689 */     mplew.writeInt(skillId);
/*  690 */     for (int i = 0; i < szieLevel; i++) {
/*  691 */       mplew.write(1);
/*  692 */       mplew.writeInt(forceCount + 1);
/*  693 */       mplew.writeInt(3);
/*  694 */       mplew.writeInt(Randomizer.rand(1, 20));
/*  695 */       mplew.writeInt(Randomizer.rand(20, 50));
/*  696 */       mplew.writeInt(Randomizer.rand(50, 200));
/*  697 */       mplew.writeInt(660);
/*  698 */       mplew.writeLong(0L);
/*  699 */       mplew.writeInt(Randomizer.nextInt());
/*  700 */       mplew.writeInt(0);
/*  701 */       mplew.writeInt(0);
/*  702 */       mplew.writeInt(0);
     }
/*  704 */     mplew.write(0);
/*  705 */     mplew.writeInt(posFrom.x - 120);
/*  706 */     mplew.writeInt(posFrom.y - 100);
/*  707 */     mplew.writeInt(posFrom.x + 120);
/*  708 */     mplew.writeInt(posFrom.y + 100);
/*  709 */     mplew.write(0);
/*  710 */     return mplew.getPacket();
   }










   public static byte[] Show影子蝙蝠_分裂(int chrId, int mobids, Point posFrom, int toMobid, int forceCount) {
/*  723 */     if (ServerConstants.isShowPacket()) {
/*  724 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  726 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  728 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  729 */     mplew.write(1);
/*  730 */     mplew.writeInt(chrId);
/*  731 */     mplew.writeInt(mobids);
/*  732 */     mplew.writeInt(MapleForceType.影子蝙蝠_反射.ordinal());
/*  733 */     mplew.write(1);
/*  734 */     mplew.writeInt(toMobid);
/*  735 */     mplew.writeInt(14000029);
/*  736 */     for (int i = 0; i < 1; i++) {
/*  737 */       mplew.write(1);
/*  738 */       mplew.writeInt(forceCount + i);
/*  739 */       mplew.writeInt(1);
/*  740 */       mplew.writeInt(5);
/*  741 */       mplew.writeInt(5);
/*  742 */       mplew.writeInt(5);
/*  743 */       mplew.writeInt(43);
/*  744 */       mplew.writeLong(1L);
/*  745 */       mplew.writeInt(Randomizer.nextInt());
/*  746 */       mplew.writeInt(0);
/*  747 */       mplew.writeInt(0);
/*  748 */       mplew.writeInt(0);
     }
/*  750 */     mplew.write(0);
/*  751 */     mplew.writeInt(posFrom.x - 120);
/*  752 */     mplew.writeInt(posFrom.y - 100);
/*  753 */     mplew.writeInt(posFrom.x + 120);
/*  754 */     mplew.writeInt(posFrom.y + 100);

/*  756 */     return mplew.getPacket();
   }




   public static byte[] showForce(MapleCharacter chr, int moboid, int forceCount, int forceColor) {
/*  763 */     if (ServerConstants.isShowPacket()) {
/*  764 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  766 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  768 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  769 */     mplew.write(1);
/*  770 */     mplew.writeInt(chr.getId());
/*  771 */     mplew.writeInt(moboid);
/*  772 */     mplew.writeInt(0);
/*  773 */     mplew.write(1);
/*  774 */     mplew.writeInt(forceCount);



/*  778 */     mplew.writeInt(forceColor);
/*  779 */     mplew.writeInt(47);
/*  780 */     mplew.writeInt(6);
/*  781 */     mplew.writeInt(46);
/*  782 */     mplew.writeInt(0);
/*  783 */     mplew.writeInt(0);
/*  784 */     mplew.writeInt(0);
/*  785 */     mplew.writeZeroBytes(25);

/*  787 */     return mplew.getPacket();
   }

   public static byte[] 刺客标记效果(int chrId, int oid, int forceCount, boolean isAssassin, List<Integer> moboids, int bulletCount, int visProjectile, Point posFrom) {
/*  791 */     if (ServerConstants.isShowPacket()) {
/*  792 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  794 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  796 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  797 */     mplew.write(1);
/*  798 */     mplew.writeInt(chrId);
/*  799 */     mplew.writeInt(oid);
/*  800 */     mplew.writeInt(11);
/*  801 */     mplew.write(1);
/*  802 */     mplew.writeInt(moboids.size());
/*  803 */     for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) { int moboid = ((Integer)iterator.next()).intValue();
/*  804 */       mplew.writeInt(moboid); }

/*  806 */     mplew.writeInt(isAssassin ? 4100012 : 4120019);
/*  807 */     for (int i = 0; i < bulletCount; i++) {
/*  808 */       mplew.write(1);
/*  809 */       mplew.writeInt(forceCount + i);
/*  810 */       mplew.writeInt(isAssassin ? 1 : 2);
/*  811 */       mplew.writeInt(Randomizer.rand(32, 48));
/*  812 */       mplew.writeInt(Randomizer.rand(3, 4));
/*  813 */       mplew.writeInt(Randomizer.rand(100, 200));
/*  814 */       mplew.writeInt(200);
/*  815 */       mplew.writeZeroBytes(8);
/*  816 */       mplew.writeZeroBytes(8);
/*  817 */       mplew.writeInt(0);
/*  818 */       mplew.writeInt(0);
     }
/*  820 */     mplew.write(0);
/*  821 */     mplew.writeInt(posFrom.x - 120);
/*  822 */     mplew.writeInt(posFrom.y - 100);
/*  823 */     mplew.writeInt(posFrom.x + 120);
/*  824 */     mplew.writeInt(posFrom.y + 100);
/*  825 */     mplew.writeInt(visProjectile);

/*  827 */     return mplew.getPacket();
   }

   public static byte[] 灵魂吸取精髓(int chrId, int skillId, int forceCount, List<Integer> moboids, int attackCount) {
/*  831 */     if (ServerConstants.isShowPacket()) {
/*  832 */       log.info("调用"+Thread.currentThread().getStackTrace()[1].getMethodName());
     }
/*  834 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  836 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  837 */     mplew.write(0);
/*  838 */     mplew.writeInt(chrId);
/*  839 */     mplew.writeInt(3);
/*  840 */     mplew.write(1);
/*  841 */     mplew.writeInt(moboids.size());
/*  842 */     for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) { int moboid = ((Integer)iterator.next()).intValue();
/*  843 */       mplew.writeInt(moboid); }

/*  845 */     mplew.writeInt(skillId);
/*  846 */     for (int i = 0; i < attackCount; i++) {
/*  847 */       mplew.write(1);
/*  848 */       mplew.writeInt(forceCount + i + 1);
/*  849 */       mplew.writeInt(1);
/*  850 */       mplew.writeInt(Randomizer.rand(20, 22));
/*  851 */       mplew.writeInt(Randomizer.rand(40, 42));
/*  852 */       mplew.writeInt(Randomizer.rand(102, 105));
/*  853 */       mplew.writeInt(Randomizer.rand(800, 821));
/*  854 */       mplew.writeInt(0);
/*  855 */       mplew.writeInt(0);
/*  856 */       mplew.writeInt(0);
/*  857 */       mplew.writeInt(2);
/*  858 */       mplew.writeInt(0);
/*  859 */       mplew.writeInt(0);
     }

/*  862 */     mplew.writeInt(0);
/*  863 */     mplew.writeInt(0);
/*  864 */     mplew.write(0);

/*  866 */     return mplew.getPacket();
   }

   public static byte[] 全箭发射(int chrId, int skillId, int forceCount, MapleMonster monster) {
/*  870 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  872 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  873 */     mplew.write(0);
/*  874 */     mplew.writeInt(chrId);
/*  875 */     mplew.writeInt(50);
/*  876 */     mplew.write(0);
/*  877 */     mplew.writeInt(0);
/*  878 */     mplew.writeInt(skillId);

/*  880 */     mplew.write(1);
/*  881 */     mplew.writeInt(forceCount);
/*  882 */     mplew.writeInt(1);

/*  884 */     mplew.writeInt(40);
/*  885 */     mplew.writeInt(5);
/*  886 */     mplew.writeInt(5);
/*  887 */     mplew.writeInt(Randomizer.rand(32, 59));

/*  889 */     mplew.writeInt(0);
/*  890 */     mplew.writeInt(0);

/*  892 */     mplew.writeInt(DateUtil.getSpecialNowiTime());
/*  893 */     mplew.writeInt(0);

/*  895 */     mplew.writeInt(0);
/*  896 */     mplew.writeInt(0);
/*  897 */     mplew.write(0);

/*  899 */     mplew.writeInt((monster.getTruePosition()).x);
/*  900 */     mplew.writeInt((monster.getTruePosition()).y);

/*  902 */     return mplew.getPacket();
   }

   public static byte[] 追加释魂(int chrId, int skillId, int forceCount, List<Integer> moboids, int attackCount, Point pos, Point pos2) {
/*  906 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  908 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  909 */     mplew.write(0);
/*  910 */     mplew.writeInt(chrId);
/*  911 */     mplew.writeInt(57);
/*  912 */     mplew.write(1);
/*  913 */     mplew.writeInt(moboids.size());
/*  914 */     for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) { int moboid = ((Integer)iterator.next()).intValue();
/*  915 */       mplew.writeInt(moboid); }

/*  917 */     mplew.writeInt(skillId);
/*  918 */     for (int i = 0; i < attackCount; i++) {
/*  919 */       mplew.write(1);
/*  920 */       mplew.writeInt(forceCount + i + 1);
/*  921 */       mplew.writeInt((skillId == 3310004) ? 2 : 1);
/*  922 */       mplew.writeInt(Randomizer.rand(41, 44));
/*  923 */       mplew.writeInt(Randomizer.rand(3, 4));
/*  924 */       mplew.writeInt(0);
/*  925 */       mplew.writeInt(60);
/*  926 */       mplew.writePosAsInt(pos);
/*  927 */       mplew.writeInt((int)System.currentTimeMillis());
/*  928 */       mplew.writeInt(0);
/*  929 */       mplew.writeInt(0);
/*  930 */       mplew.writeInt(0);
     }
/*  932 */     mplew.write(0);

/*  934 */     mplew.writeInt(0);
/*  935 */     mplew.writeInt(0);
/*  936 */     mplew.writeInt(0);
/*  937 */     mplew.writeInt(0);
/*  938 */     mplew.writeInt(2);
/*  939 */     mplew.writePosAsInt(pos2);

/*  941 */     return mplew.getPacket();
   }

   public static byte[] 精神之箭(int chrId, int skillId, int forceCount, List<Integer> moboids, int attackCount, Point pos, Point pos2) {
/*  945 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  947 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  948 */     mplew.write(1);
/*  949 */     mplew.writeInt(chrId);
/*  950 */     mplew.writeInt(chrId);
/*  951 */     mplew.writeInt(58);
/*  952 */     mplew.write(1);
/*  953 */     mplew.writeInt(moboids.size());
/*  954 */     for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) { int moboid = ((Integer)iterator.next()).intValue();
/*  955 */       mplew.writeInt(moboid); }

/*  957 */     mplew.writeInt(skillId);
/*  958 */     for (int i = 0; i < attackCount; i++) {
/*  959 */       mplew.write(1);
/*  960 */       mplew.writeInt(forceCount + i + 1);
/*  961 */       mplew.writeInt(1);
/*  962 */       mplew.writeInt(Randomizer.rand(4, 29));
/*  963 */       mplew.writeInt(Randomizer.rand(3, 4));
/*  964 */       mplew.writeInt(Randomizer.rand(20, 335));
/*  965 */       mplew.writeInt(120);
/*  966 */       mplew.writePosAsInt(pos);
/*  967 */       mplew.writeInt((int)System.currentTimeMillis());
/*  968 */       mplew.writeInt(0);
/*  969 */       mplew.writeInt(0);
/*  970 */       mplew.writeInt(0);
     }
/*  972 */     mplew.write(0);

/*  974 */     mplew.writeInt(0);
/*  975 */     mplew.writeInt(0);
/*  976 */     mplew.writeInt(0);
/*  977 */     mplew.writeInt(0);
/*  978 */     mplew.writeInt(2);
/*  979 */     mplew.writePosAsInt(pos2);

/*  981 */     return mplew.getPacket();
   }

   public static byte[] 暗红释魂(int chrId, int skillId, int forceCount, List<Integer> moboids, int attackCount) {
/*  985 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/*  987 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/*  988 */     mplew.write(0);
/*  989 */     mplew.writeInt(chrId);
/*  990 */     mplew.writeInt(56);
/*  991 */     mplew.write(1);
/*  992 */     mplew.writeInt(moboids.size());
/*  993 */     for (Iterator<Integer> iterator = moboids.iterator(); iterator.hasNext(); ) { int moboid = ((Integer)iterator.next()).intValue();
/*  994 */       mplew.writeInt(moboid); }

/*  996 */     mplew.writeInt(skillId);
/*  997 */     for (int i = 0; i < attackCount; i++) {
/*  998 */       mplew.write(1);
/*  999 */       mplew.writeInt(forceCount + i + 1);
/* 1000 */       mplew.writeInt(1);
/* 1001 */       mplew.writeInt(Randomizer.rand(22, 29));
/* 1002 */       mplew.writeInt(Randomizer.rand(7, 8));
/* 1003 */       mplew.writeInt(Randomizer.rand(7, 167));
/* 1004 */       mplew.writeInt(60);
/* 1005 */       mplew.writeInt(0);
/* 1006 */       mplew.writeInt(0);

/* 1008 */       mplew.writeInt((int)System.currentTimeMillis());
/* 1009 */       mplew.writeInt(0);
/* 1010 */       mplew.writeInt(0);
/* 1011 */       mplew.writeInt(0);
     }
/* 1013 */     mplew.write(0);

/* 1015 */     return mplew.getPacket();
   }




   public static byte[] Show封魔葫芦符(int cid, int moboid, int forceCount, int skillid) {
/* 1022 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 1024 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/* 1025 */     mplew.write(1);
/* 1026 */     mplew.writeInt(cid);
/* 1027 */     mplew.writeInt(moboid);
/* 1028 */     mplew.writeInt(63);
/* 1029 */     mplew.write(1);
/* 1030 */     mplew.writeInt(cid);
/* 1031 */     mplew.writeInt(skillid);

/* 1033 */     mplew.write(1);
/* 1034 */     mplew.writeInt(forceCount + 1);
/* 1035 */     mplew.writeInt(1);
/* 1036 */     mplew.writeInt(5);
/* 1037 */     mplew.writeInt(30);
/* 1038 */     mplew.writeInt(0);
/* 1039 */     mplew.writeInt(0);
/* 1040 */     mplew.writeInt(0);
/* 1041 */     mplew.writeInt(0);
/* 1042 */     mplew.writeInt((int)System.currentTimeMillis());
/* 1043 */     mplew.writeInt(0);
/* 1044 */     mplew.writeInt(0);
/* 1045 */     mplew.writeInt(0);
/* 1046 */     mplew.write(0);

/* 1048 */     return mplew.getPacket();
   }

   public static byte[] show卷术蝶梦(int chrId, int forceCount, int mobcount, Point pos) {
/* 1052 */     MaplePacketLittleEndianWriter mplew = new MaplePacketLittleEndianWriter();

/* 1054 */     mplew.writeShort(SendPacketOpcode.FORCEATOM_CREATE.getValue());
/* 1055 */     mplew.write(0);
/* 1056 */     mplew.writeInt(chrId);
/* 1057 */     mplew.writeInt(61);
/* 1058 */     mplew.write(0);
/* 1059 */     mplew.writeInt(0);
/* 1060 */     mplew.writeInt(164120007);
/* 1061 */     for (int i = 0; i < mobcount; i++) {
/* 1062 */       mplew.write(1);
/* 1063 */       mplew.writeInt(forceCount + i + 1);
/* 1064 */       mplew.writeInt(1 + i);

/* 1066 */       mplew.writeInt(Randomizer.rand(40, 44));
/* 1067 */       mplew.writeInt(Randomizer.rand(3, 4));
/* 1068 */       mplew.writeInt(Randomizer.rand(45, 352));
/* 1069 */       mplew.writeInt(0);

/* 1071 */       mplew.writeInt(0);
/* 1072 */       mplew.writeInt(0);
/* 1073 */       mplew.writeInt((int)System.currentTimeMillis());
/* 1074 */       mplew.writeInt(0);
/* 1075 */       mplew.writeInt(0);
/* 1076 */       mplew.writeInt(0);
     }
/* 1078 */     mplew.write(0);

/* 1080 */     mplew.writePosAsInt(pos);

/* 1082 */     return mplew.getPacket();
   }
 }


/* Location:              C:\PGX\Server.jar!\tools\packet\ForcePacket.class
 * Java compiler version: 8 (52.0)
 * JD-Core Version:       1.1.3
 */